package org.mil.gui;

import java.awt.Component;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;

import javax.swing.ProgressMonitor;

public class CollectProgressMonitor extends ProgressMonitor implements
		PropertyChangeListener {
	static String message="正在收集媒体信息...";
	static String note= "正在初始化...";
	public CollectProgressMonitor(Component parentComponent, int min, int max) {		
		super(parentComponent, message, note, min, max);		
	}

	@Override
	public void propertyChange(PropertyChangeEvent event) {
		 int progress=(Integer) event.getNewValue();
		 this.setProgress(progress);
		 this.setNote("已收集文件: " + progress + "/"+getMaximum());
		 
		//System.out.println("Change:progress="+progress);
	}

}
